package com.lalameow.researchstation

import net.minecraft.util.Identifier

val ResearchStation.identifiers: Identifiers
    get() = Identifiers

object Identifiers {
    val RESEARCH_STATION = ResearchStation.identifier("research_station")!!
    val RESEARCHING_TREE = ResearchStation.identifier("researching_tree")!!
    val TECHNOLOGY_CATEGORIES = ResearchStation.identifier("technology_categories")!!
}

fun ResearchStation.identifier(id: String) =
    if (':' in id) id.identifier()
    else Identifier(MOD_ID, id)

fun String.identifier() = Identifier.tryParse(this)
